package com.gavindon.android.repo

import com.gavindon.android.base.BaseRepository
import com.gavindon.android.entity.SmartEducationContentResp
import com.gavindon.android.entity.SmartLeftTreeResp
import com.gavindon.android.network.DataResult

/**
 * description: 智慧教育
 * Created by liNan on  2022-2-7 09:39
 */
class SmartEducationRepo : BaseRepository() {


    suspend fun getLeftTree(type:Int): DataResult<List<SmartLeftTreeResp>> {
        return launchRequest {
            service.subjectTree(type)
        }
    }

    suspend fun getCourseList(subjectId: String): DataResult<List<SmartEducationContentResp>> {
        return launchRequest {
            service.subjectCourseList(subjectId = subjectId)
        }
    }
}